/*
 * BulletBase.h
 * The BulletBase plugin class declaration
 */

#pragma once

#include "orbitersdk.h"


//#define BULLETBASE_WHEELANIM


struct packet{
	float m[16];  //Entire mesh transform
	float childMat[16];  //transform for chassis only
	

	//Wheel transforms
	float m1[16], m2[16], m3[16], m4[16];
	float m_box[16];

	int upAxis;
	float radius, halfHeight;
	float susp;
	float rot[4];
	float steering;

	//Engine info
	int m_gear;
	float speed;
};

//#define BULLETBASE_WHEELANIM

#define NO_KEY -1

//Bullet vehicles size
const UINT NUM_BULLETVEHICLES = 1; //increase to 6 for debugging attachment point based vehicle

class BulletBase: public VESSEL3 {		
	
	

public:
	//Methods-------------------------------------------------
	BulletBase (OBJHANDLE hVessel, int flightmodel);
	~BulletBase ();
	DWORD baseCmd;

	//Vessel Callbacks
	void	clbkSetClassCaps (FILEHANDLE cfg);
	void	clbkPreStep(double SimT, double SimDT, double MJD);
	int		clbkConsumeBufferedKey(DWORD key, bool down, char *kstate);		
	int		clbkGeneric( int  msgid = 0, int  prm = 0,  void *  context = NULL);
	void 	clbkSaveState  ( FILEHANDLE  scn );

	

	

	
};
